<!--
 * @Author: rxn 1003312535@qq.com
 * @Date: 2023-02-17 22:22:18
 * @LastEditors: rxn 1003312535@qq.com
 * @LastEditTime: 2024-11-11 09:14:52
 * @FilePath: \vue3-progect\src\App.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
	<el-config-provider :locale="locale">
		<router-view v-slot="{ Component, route }">
			<transition :name="route.meta?.transition || 'fade'">
				<keep-alive>
					<component :is="Component" />
				</keep-alive>
			</transition>
		</router-view>
	</el-config-provider>
</template>

<script setup lang="ts">
import { computed } from "vue";
import En from "element-plus/es/locale/lang/en";
import zhCn from "element-plus/es/locale/lang/zh-cn";
import { useLocaleStore } from "@/store/modules/locale";
const localeStore = useLocaleStore();
const locale = computed(() => {
	return localeStore.locale == "zh-cn" ? zhCn : En;
});
// console.log(locale, "locale");
</script>
